package struts2.hanh;

import java.util.ArrayList;

import DAO.Dao_Programme;
import Entity.Programme;

import com.opensymphony.xwork2.ActionSupport;


public class SaveAction extends ActionSupport{
	private String name;
	private String des;
	
	private boolean active;
	private ArrayList<Programme> prlist ;

	public ArrayList<Programme> getPrlist() {
		return prlist;
	}

	public void setPrlist(ArrayList<Programme> prlist) {
		this.prlist = prlist;
	}

	public String execute() throws Exception {
		System.out.println("name="+name);
		System.out.println("des="+des);		
		Dao_Programme det = new Dao_Programme();
		det.setDsUpdate(name, des, active);
		prlist = det.getProgram();
		return "success";

	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDes() {
		return des;
	}

	public void setDes(String des) {
		this.des = des;
	}

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}



	

}
